Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triggers full text search when Ctrl + Enter is pressed in note_autocomplete. #585

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

SiriusXT
Copy link

When searching for notes, title search sometimes fails to find the desired note.

This PR enables full-text search directly by pressing Ctrl + Enter.

@eliandoran
Copy link

Hi, @SiriusXT .

Could you please provide a little bit more context about this PR?

  1. Where exactly would a user benefit from this feature? For example, the Jump-to-note feature already has a full text search bound to Ctrl+Enter.
  2. We most certainly need to find a way to inform the user about this feature, otherwise there will be no way to tell of its existence.

@SiriusXT
Copy link
Author

  1. I was also inspired by "Jump to Note," but when typing text into the input field and failing to find the desired note, pressing Ctrl + Enter does not trigger a jump to full-text search. Instead, it opens the "Create New Note" dialog. Currently, the only way to perform a full-text search is by either clicking the "Full-text Search" button with the mouse or moving the focus out of the input field.

  2. Primarily, in a new blank tab or the "Jump to Note" dialog, if the title search doesn't yield the desired note, we can use Ctrl + Enter to quickly jump to full-text search. This avoids the need to copy the search query, open the full-text search page, and paste the query again to perform the search.

  3. Of course, it is also acceptable to limit this feature to the input fields in new tabs and the "Jump to Note" dialog. Listening to all autocomplete input fields (including those in "Insert Note" or "Clone Note") won’t cause negative impact since the listener is only activated by Ctrl + Enter.

  4. The search_placeholder for the input field can be updated from "Search for a note by its name" to "Search for a note by its name, press Ctrl + Enter to jump to full-text search."

@SiriusXT SiriusXT marked this pull request as draft November 17, 2024 03:24
@SiriusXT SiriusXT marked this pull request as ready for review November 17, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants